<?php
/**
 * role
 *  @OA\Schema(
 *       schema="Role",
 *       description="Role-角色",
 *       @OA\Property(
 *            property="id",
 *            type="number"
 *       ),
 *       @OA\Property(
 *            property="role_name",
 *            type="string",
 *            description="角色名"
 *      ),
 *      @OA\Property(
 *            property="identify",
 *            type="string",
 *            description="角色的标识，用英文表示，用于后台路由权限"
 *       ),
 *       @OA\Property(
 *            property="parent_id",
 *            type="number",
 *            description="父级ID",
 *       ),
 *     @OA\Property(
 *            property="description",
 *            type="string",
 *            description="角色备注",
 *       ),
 *     @OA\Property(
 *            property="creator_id",
 *            type="number",
 *            description="创建人ID",
 *       ),
 *     @OA\Property(
 *            property="data_range",
 *            type="number",
 *            description="1 全部数据 2 自定义数据 3 仅本人数据 4 部门数据 5 部门及以下数据",
 *       ),
 *     @OA\Property(
 *            property="created_at",
 *            type="string",
 *            description="创建时间"
 *       ),
 *     @OA\Property(
 *            property="updated_at",
 *            type="string",
 *            description="更新时间",
 *     ),
 *     @OA\Property(
 *            property="deleted_at",
 *            type="string",
 *            description="删除状态，0未删除 >0 已删除",
 *     ),
 *     @OA\Property(
 *            property="_permissions",
 *            type="array",
 *            @OA\Items(type="number"),
 *            description="拥有的权限id",
 *     ),
 *     @OA\Property(
 *            property="permissions",
 *            type="array",
 *            @OA\Items(type="number"),
 *            description="拥有的权限id",
 *     ),
 * )
 *
 * @OA\Get(path="/roles",
 *   tags={"role"},
 *   summary="角色列表",
 *   operationId="getRoles",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/pageSize"),
 *   @OA\Parameter(ref="#/components/parameters/current"),
 *   @OA\Parameter(ref="#/components/parameters/keyword"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/QueryResponse")
 *   )
 * )
 *
 *
 * @OA\Post(path="/roles",
 *   tags={"role"},
 *   summary="创建角色",
 *   operationId="createRole",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Role")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Put(path="/roles/{id}",
 *   tags={"role"},
 *   summary="更新角色",
 *   operationId="updateRole",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\RequestBody(
 *     @OA\MediaType(
 *       mediaType="application/json",
 *         @OA\Schema(ref="#/components/schemas/Role")
 *       )
 *     ),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 *
 *
 * @OA\Delete (path="/roles/{id}",
 *   tags={"role"},
 *   summary="删除角色",
 *   operationId="deleteRole",
 *   security={{"Authorization-Bearer":{}}},
 *   @OA\Parameter(ref="#/components/parameters/id"),
 *   @OA\Response(response="200", description="Success",
 *       @OA\JsonContent(ref="#/components/schemas/HandleResponse")
 *   )
 * )
 */
